package com.wen.oop05;

//学生也是人：派生类或子类
//继承是类根类之间的一种关系，还有依赖组合聚合
public class students extends person02{
    public students() {
//    隐藏代码，调用了父类的无参构造
        super();
        System.out.println("子类的无参构造");
//        调用父类构造器必须在子类构造器的第一行
    }
private String name="邵美丽";
public void print(){
    System.out.println("Student");
}
public void test1(){
    print();//Student
    this.print();//Student
    super.prient();//父类的personnnn!
}


public void test(String name){

    System.out.println(name);
//   类里面的name
    System.out.println(this.name);
//    子类访问父类
    System.out.println(super.name);
}
}
/*package com.wen;

import com.wen.oop05.students;

public class application {
    public static void main(String[] args) {
        students students = new students();
//        students.test("邵雯瑄");
        System.out.println("====================");
//students.test1();

    }
}
*/
